#pragma once

#include <string>

#include "CalibData.h"

#include <TFile.h>
#include <service.h>

class ArchiveWrapper
{
public:
	ArchiveWrapper(std::string name, int shotNum, bool write = false);
	~ArchiveWrapper(void);

	TSignal * Signal(int chanelNum);
        double Amplification(int chanelNum);
	bool GetCalibrations(CalibData &);
        void SaveCalibrations(CalibData &);

        bool Valid();
        int FirstShot();
        int LastShot();

private:
	std::string m_branchName;
	unsigned int m_shotNum;
	TFile *m_handle;
};

